//import 'package:amap_base/amap_base.dart';

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_hotwork/HomePage.dart';
import 'package:flutter_hotwork/homepage/BaseTitleBar.dart';
import 'package:flutter_hotwork/homepage/BaseViewBar.dart';
import 'package:flutter_hotwork/utils/DioUtils.dart';
// import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';

import 'JieSuanNianBao.dart';
import 'JieSuanRiBao.dart';
import 'JieSuanYueBao.dart';

class jiesuanbaobiaoPage extends StatefulWidget {
  @override
  jiesuanbaobiaoState createState() => new jiesuanbaobiaoState();
}

class jiesuanbaobiaoState extends State<jiesuanbaobiaoPage> {

  @override
  void initState() {
    super.initState();
    DioUtils.createInstance();
  }

  @override
  void dispose() {
//    _amapLocation.stopLocate();
    super.dispose();
  }

  TabController _tabController;

  @override
  Widget build(BuildContext context) {
    double rpx = MediaQuery.of(context).size.height / 750;
    return
      Material(child:
      Scaffold(
        appBar: new BaseViewBar(
            childView: new BaseTitleBar(
              "结算报表",
              leftIcon: 'images/fanhui.png',
              rightIcon:  '',
              rightClick: () {
              },
              leftClick: () {
                print("点击了左边干嘛啊。。。哦");
                Navigator.of(context).pop();
              },
            ),
            preferredSize: Size.fromHeight(50.0)),
        body:
        Card(
          child:
          DefaultTabController(
            length: 3,
            child:
            Column(
              children:[
                TabBar(
                  labelColor: Colors.blue,
                  unselectedLabelColor: Colors.black,
                  indicatorColor: Colors.blue,
                  tabs: <Widget>[
                    Tab(text: "财务日报"),
                    Tab(text: "财务月报"),
                    Tab(text: "财务年报"),
                  ],
                  controller: _tabController,  // 记得要带上tabController
                ),
                Container(
                  height: rpx*596,
                  child:
                  TabBarView(
                    controller: _tabController,
                    children: <Widget>[
                      Center(
                          child: jiesuanbaobiaocaiwuriPage()
                      ),
                      Center(
                          child: jiesuanbaobiaocaiwuyuePage()
                      ),
                      Center(
                          child: jiesuancaiwunianbaoPage()
                      ),
                    ],
                  ),
                ),
              ],
            ),

          ),
        ),
      )
        );

  }


}






















